Video coding, decoding and hypothetical reference decoder

ABSTRACT

An encoder comprising an input for inputting video signal to be encoded to form an encoded video signal comprising pictures of at least a first coded video sequence and a second coded video sequence a hypothetical decoder for hypothetically decoding encoded video signal, an encoded picture buffer, and a decoded picture buffer, and a definer for defining a parameter indicative of the temporal difference between the last picture of the first coded video sequence and the first picture of the second coded video sequence in output/display order.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the U.S. National Stage of International ApplicationPCT/FI2005/050445 filed Dec. 5, 2005 and claiming priority from U.S.Provisional Application Ser. No. 60/633,827 filed Dec. 6, 2004.

FIELD OF THE INVENTION

The present invention relates to video coding and decoding processes inwhich a hypothetical reference decoder is implemented. Morespecifically, the present invention relates to an encoder comprising aninput for inputting video signal to be encoded to form an encoded videosignal, a decoder, a method, a bitstream, a computer program product anda medium for carrying a bitstream.

BACKGROUND OF THE INVENTION

There are numerous video coding standards including ITU-T H.261, ISO/IECMPEG-1 Visual, ITU-T H.262 or ISO/IEC MPEG-2 Visual, ITU-T H.263.ISO/IEC MPEG-4 Visual and ITU-T H.264 or ISO/IEC MPEG-4 AVC. H.264/AVCis the work output of a Joint Video Team (JVT) of ITU-T Video CodingExperts Group (VCEG) and ISO/IEC MPEG

In addition, there are efforts working towards new video codingstandards. One is the development of scalable video coding (SVC)standard in MPEG. This will become MPEG-21 Part 13. The second effort isthe development of China video coding standards organized by the ChinaAudio Visual coding Standard Work Group (AVS). AVS has finalized itsfirst video coding specification, AVS 1.0 targeted for SDTV and HDTVapplications. Since then the focus has moved to mobile video services.The resulting two standards AVS-M Stage 1 and AVS-M Stage 2 are underdevelopment.

Instantaneous Decoding Refresh (IDR) Picture

Instantaneous decoding refresh (IDR) picture was first introduced intoH.264, and later was introduced also into AVS-M. IDR pictures arenaturally random access points. No subsequent picture can refer topictures that are earlier than the IDR picture in decoding order. Anypicture preceding an IDR picture in decoding order shall also beoutputted/displayed earlier than the IDR picture. Each IDR picture leadsa coded video sequence that consists of the IDR picture until the nextIDR picture in decoding order.

In AVS-M committee draft (CD), there is an 8-bit syntax elementpicture_distance that indicates the temporal reference of each picturein one coded sequence. The value of picture_distance is equal to thepicture_distance value of the previous picture in output/display orderplus 1 and plus the number of skipped pictures between the currentpicture and the previous picture, and then modulo 256. For the firstpicture of a coded video sequence (IDR picture) the picture_distancevalue is 0.

Hypothetical Reference Decoder

In video coding standards, a compliant bit stream must be able to bedecoded by a hypothetical reference decoder that is conceptuallyconnected to the output of an encoder and consists of at least apre-decoder buffer, a decoder and an output/display unit. This virtualdecoder is known as the hypothetical reference decoder (HRD) in H.263,H.264 and the video buffering verifier (VBV) in MPEG. PSS Annex G, theannex G of the 3GPP packet-switched streaming service standard (3GPP TS26.234): specifies a server buffering verifier that can also beconsidered as an HRD, with the difference that it is conceptuallyconnected to the output of a streaming server. The virtual decoder andbuffering verifier are collectively called as hypothetical referencedecoder (HRD) in this document. A stream is compliant if it can bedecoded by the HRD without buffer overflow or underflow, Buffer overflowhappens if more bits are to be placed into the buffer when it is full.Buffer underflow happens if some bits are not in the buffer when thebits are to be fetched from the buffer for decoding/playback.

HRD parameters can be used to impose constraints to the encoded sizes ofpictures and to assist deciding the required buffer sizes and start-updelay.

In earlier HRD specifications than in PSS Annex G and H.264, only theoperation of the pre-decoded buffer (also called as a coded picturebuffer, CPE, in H.264) is specified. The HRD in PSS Annex G and H.264HRDalso specify the operation of the post-decoder buffer (also called as adecoded picture buffer, DBP, in H.264). Further, earlier HRDspecifications enable only one HRD operation point, while the HRD in PSSAnnex G and H.264 HRD allows for multiple HRD operation points. Each HRDoperation point corresponds to a set of HRD parameter values.

The HRD in PSS Annex G is much simpler than H.264 HRD in terms of twofactors, 1) specifications of CPB and DPB operations are much simpler,and 2) no timing information from the bitstream is required. Therefore,from this point of view, it is beneficial to use the HRD in PSS Annex Gas the basis of the HRD of a video coding standard.

A shortcoming of the HRD design is that it relies on the presentationtime (or capturing time) of each picture provided by external meansother than the bitstream itself. However, it may be sometimes necessaryor desirable that the bitstream itself could be verified. One solutionis to utilize the relative presentation time indicated by the temporalreference information (e.g. picture_distance in AVS-M) provided that thetime duration of the temporal reference difference of 1 is also signaledin the bitstream.

There is at least one problem associated with the above-described HRDdesign based on the HRD in PSS Annex G and the relative presentationtime according to the temporal information. That is, if the bitstreamconsists of more than one coded video sequence, then the relativepresentation time of a picture in a coded video sequence other than thefirst coded video sequence cannot be derived because the temporalreference value is reset to 0 at the beginning IDR picture of each codedvideo sequence. Therefore, the temporal gap between the last picture ofa coded video sequence and the beginning IDR picture of the subsequentcoded video sequence in output/display order is unclear. This can makethe HRD un-optimal. This problem can become more cumbersome if thebitstream was spliced from different coded video sequences originateddifferently, for example, when a commercial video clip is inserted intoanother video bitstream.

SUMMARY OF THE INVENTION

The present invention tries to solve the problem stated above. Accordingto the present invention a parameter indicative of the temporaldifference between the last picture (in output/display order) of a codedvideo sequence and the first picture of a subsequent video sequence issignaled. There are at least two solutions to implement the idea. Thefirst solution is to change the semantics of the syntax element fortemporal reference (picture_distance in AVS-M) such that the value ofthe syntax element continually increases at IDR pictures as if they arenon-IDR pictures. The value may reach a maximum value whereafter thevalue may be set to an initial value, for example to 0 after which thevalue will again be increased.

The second solution is to signal in the bitstream for each IDR picturethe temporal gap between the IDR picture and the previous picture inoutput/display order. If the IDR picture is the first picture in thebitstream, the value of the temporal gap is set to 0.

According to one aspect of the present invention there is provided anencoder comprising

-   -   an input for inputting video signal to be encoded to form an        encoded video signal comprising pictures of a first coded video        sequence and a second coded video sequence,    -   an encoded picture buffer;    -   a decoded picture buffer; and    -   a definer for defining at least one parameter indicative of the        temporal difference between    -   the last picture of said first coded video sequence and the        first picture of said second coded video sequence, wherein said        at least one parameter is signaled in the encoded video signal.

According to another aspect of the present invention there is provided abitstream comprising

-   -   an encoded video signal comprising pictures of a first coded        video sequence and a second coded video sequence; and    -   at least one parameter indicative of the temporal difference        between the last picture of said first coded video sequence and        the first picture of said second coded video sequence,        -   said at least one parameter.

According to a third aspect of the present invention there is provided adecoder comprising

-   -   an input for inputting encoded video signal to be decoded, said        encoded video signal comprising        -   pictures of a first coded video sequence and a second coded            video sequence; and        -   at least one parameter indicative of the temporal difference            between the last picture of said first coded video sequence            and the first picture of said second coded video sequence            following said at least one coded video sequence in            output/display order.        -   said at least one parameter,    -   a decoded picture buffer; and    -   means for parsing information received in the encoded video        signal to obtain said at least one parameter.

According to a fourth aspect of the present invention there is provideda method comprising

-   -   inputting video signal to be encoded to form an encoded video        signal comprising pictures of a first coded video sequence and a        second coded video sequence;    -   defining at least one parameter indicative of the temporal        difference between    -   the last picture of said first coded video sequence and the        first picture of said second coded video sequence, wherein said        at least one parameter is signaled in the encoded video signal.

According to a fifth aspect of the present invention there is provided asystem comprising

-   -   an encoder comprising        -   an input for inputting video signal to be encoded to form an            encoded video signal comprising pictures of a first coded            video sequence and a second coded video sequence;        -   an encoded picture buffer;        -   a decoded picture buffer; and        -   a definer for defining at least one parameter indicative of            the temporal difference between        -   the last picture of said first coded video sequence and the            first picture of said second coded video sequence, wherein            said at least one parameter is signaled in the encoded video            signal;    -   a decoder comprising        -   an input for inputting said encoded video signal to be            decoded;        -   a decoded picture buffer; and        -   means for parsing information received in the encoded video            signal to obtain said at least one parameter.

According to a sixth aspect of the present invention there is provided asoftware program comprising machine executable instructions for

-   -   inputting video signal to be encoded to form an encoded video        signal comprising pictures of a first coded video sequence and a        second coded video sequence;    -   defining at least one parameter indicative of the temporal        difference between    -   the last picture of said first coded video sequence and the        first picture of said second coded video sequence following said        at least one coded video sequence in output/display order        -   signaling said at least one parameter in the encoded video            stream.

According to a seventh aspect of the present invention there is provideda medium for carrying a bitstream comprising

-   -   an encoded video signal comprising pictures of a first coded        video sequence and a second coded video sequence, and    -   at least one parameter indicative of the temporal difference        between the last picture of said first coded video sequence and        the first picture of said second coded video sequence following        said at least one coded video sequence in output/display order    -   said at least one parameter.

The method can improve the operation of the hypothetical referencedecoder and also the end user experience when video stream is decoded bya decoder and presented.

DESCRIPTION OF THE DRAWINGS

FIG. 1 a presents an example of a prior art picture stream in which thepictures are in a display order,

FIG. 1 b presents an example of a prior art picture stream in which thepictures are in a decoding order,

FIG. 2 a presents an example of a picture stream according to thepresent invention in which the pictures are in a display order,

FIG. 2 b presents an example of a picture stream according to thepresent invention in which the pictures are in a decoding order,

FIG. 3 a presents another example of a picture stream according to thepresent invention in which the pictures are in a display order,

FIG. 3 b presents another example of a picture stream according to thepresent invention in which the pictures are in a decoding order,

FIG. 4 presents an example of signaling of HRD parameters,

FIG. 5 depicts an example embodiment of the system according to thepresent invention,

FIG. 6 depicts an example embodiment of the encoder according to thepresent invention, and

FIG. 7 depicts an example embodiment of the decoder according to thepresent invention.

DETAILED DESCRIPTION OF THE INVENTION

The hypothetical reference decoder 5 according to this invention ispresented as follows. In FIG. 6 an example embodiment of the encoder 1comprising the hypothetical reference decoder 5 is depicted as asimplified block diagram.

The buffering model is based on two buffers and two timers. The buffersare called a coded picture buffer 1.5 (OPB) and a decoded picture buffer5.2 (DPB). The timers are named as a decoding timer 1.6 and an outputtimer 1.7. The buffering model is presented below.

The coded picture buffer 1.5 and the decoded picture buffer 5.2 areinitially empty. Then, encoding element 1.8 which may be implementede.g. in the processor 1.2 of the encoder, begins to encode the videostream and forms coded pictures. Pictures or parts of the pictures ofthe video stream, for example reference pictures, may be buffered in theencoding buffer 1.1. The bits of coded pictures are entered to the codedpicture buffer 1.5 at the rate equal to a bit_rate parameter. Thedecoding timer 1.6 is initiated to a negative value equal to(0−initial_cpb_removal_delay) and the decoding timer 1.6 is started whenthe first bit enters the coded picture buffer 1.5. Data is not removedfrom the coded picture buffer 1.5 if the value of the decoding timer 1.6is smaller than 0. Removal of a coded picture from the coded picturebuffer 1.5 is started when the previous coded picture has been entirelyremoved from the coded picture buffer 1.5. Alternatively, removal of acoded picture from the coded picture buffer 1.5 is started when both ofthe following two conditions are met: First, the value of the decodingtimer 1.6 is equal to the relative output time of the picture. Second,the previous coded picture has been entirely removed from the codedpicture buffer 1.5.

The duration of coded picture removal is equal to the number ofmacroblocks in the coded picture divided by the peak decoding macroblockrate. Alternatively, the duration of coded picture removal is the largerone of the following two values: The first value is equal to the numberof macroblocks in the coded picture divided by the peak decodingmacroblock rate. The second value is equal to the number of bytes in thecoded picture divided by the peak decoding byte rate. When the codedpicture has been removed from the coded picture buffer 1.1 entirely, thecorresponding decoded picture is put into the decoded picture buffer5.2. The peak decoding macroblock rate is the maximum decoding speed, inunits of a macroblock per second, needed to decode the bitstream. Thepeak decoding byte rate is the maximum decoding speed in units of bytesper second needed to decode the bitstream. The peak decoding macroblockrate and the peak decoding byte rate are specified in level definitionsand they may vary in a video bitstream, either from a picture to apicture, of from a group of pictures to another group of pictures.

The output timer 1.7 is initiated to a negative value equal to(0−initial_dpb_out_delay) and started when the first decoded pictureenters the decoded picture buffer 5.2. Data is not outputted from thedecoded picture buffer 5.2 if the value of the output timer 1.7 issmaller than 0. A decoded picture is outputted from the decoded picturebuffer 5.2 substantially immediately when the value of the output timer1.7 is equal to the relative output time of the picture. If the decodedpicture is a non-reference picture or if the decoded picture is areference picture but is marked as “unused for reference”, the data ofthe decoded picture is also removed from the DPB when it is outputted.When outputting a decoded picture from the DPB, decoded pictures thatare marked as “unused for reference” and the relative output times areearlier than the output timer are removed from the DPB. The marking of areference picture as “used for reference” or “unused for reference”should be specified by the standard.

The buffering model may be initialized at any picture that is associatedwith a set of HRD parameters.

Requirements for a Compliant Bitstream

A transmitted or stored compliant bitstream shall fulfill the followingrequirements when the HRD is operated at any of the signaled operationpoints.

The coded picture buffer (CPB) and decoded picture buffer (DPB) shallnever overflow. In other words, the occupancy of the coded picturebuffer shall not exceed the default or signalled buffer size, and,respectively, the occupancy of the decoded picture buffer shall notexceed the default or signalled buffer size.

The decoded picture buffer shall never underflow i.e. each decodedpicture shall be inserted into the decoded picture buffer before or atits relative output time.

Requirements for a Compliant Decoder

A compliant decoder shall fulfill the following requirements:

A decoder claiming conformance to a specific profile and level shall beable to decode successfully all conforming bitstreams.

A decoder shall be capable of receiving and decoding all the pictures ina compliant bit-stream when the same buffer sizes are assumed both inthe decoder and in the bit-stream. Furthermore, the decoder shall becapable of passing each picture to a display/output process at the sametime when the hypothetical reference decoder would virtuallydisplay/output the picture.

In an example embodiment the following parameters are defined for theoperation of the hypothetical reference decoder 5: cpb_dpb_cnt_minus1,bit_rate, cpb_size, dpb_size, initial_cpb_removal_delay andinitial_dpb_output_delay.

There can be more than one alternative coded picture buffer and decodedpicture buffer specifications for the coded video sequence. Theparameter cpb_dpb_cnt_minus1 plus 1 specifies the number of thealternative specifications for the coded picture buffer and the decodedpicture buffer.

bit_rate parameter specifies the maximum input bit rate of the i-thcoded picture buffer.

cpb_size parameter specifies the coded picture buffer size of the i-thcoded picture buffer.

At least one pair of values of bit_rate and cpt_size shall conform tothe maximum bitrate and coded picture buffer size allowed by profile andlevel.

dpb_size parameter specifies the decoded picture buffer size of the i-thdecoded picture buffer.

inital_cpb_removal_delay parameter specifies the delay for the i-thcoded picture buffer between the time of arrival in the coded picturebuffer of the first bit of the first picture and the time of removalfrom the coded picture buffer of the first picture.

initial_dpb_output delay parameter specifies the delay for the i-thdecoded picture buffer between the time of arrival in the decodedpicture buffer of the first decoded picture and the time of output fromthe decoded picture buffer of the first decoded picture.

The syntax for the specifications mentioned above can be defined as thefollowing pseudo code:

hrd_parameters( ) { cpb_dpb_cnt_minus1 for(i = 0; i <=cpb_dpb_cnt_minus1) { bit_rate cpb_size dpb_sizeinitial_cpb_removal_delay initial_dpb_output_delay } }

The parameters in the above syntax can be signalled in a picture-levelheader, e.g. supplemental enhancement information (SEI) message orpicture header. Alternatively, the parameters can be signalled in asequence-level header, e.g. sequence header or sequence parameter set.

The parameters in the above syntax can be directly signalled as is, orusing a method to save signalling bits. For example, both the lengthrepresentation of the actual value and the actual value are signalled.In FIG. 4 there is depicted a non-restricting example of the signalledparameters. The first parameter indicate that there are two HRDparameter sets in the signal. That parameter is followed by two HRDparameter sets.

The specifications are used by the hypothetical reference decoder 5 ofthe encoder 1 and they can be signalled to the decoder 2.

In the following the invention will be described in more detail withreference to the system of FIG. 5, the encoder 1 and hypotheticalreference decoder (HRD) 5 of FIG. 6 and decoder 2 of FIG. 7. Thepictures to be encoded can be, for example, pictures of a video streamfrom a video source 3, e.g. a camera, a video recorder, etc. Thepictures (frames) of the video stream can be divided into smallerportions such as slices. The slices can further be divided into blocks.In the encoder 1 the video stream is encoded to reduce the informationto be transmitted via a transmission channel 4, or to a storage media(not shown). Pictures of the video stream are input to the encoder 1.The encoder has an encoding buffer 1.1 (FIG. 6) for temporarily storingsome of the pictures to be encoded. The encoder 1 also includes a memory1.3 and a processor 1.2 in which the encoding tasks according to theinvention can be applied. The memory 1.3 and the processor 1.2 can becommon with the transmitting device 6 or the transmitting device 6 canhave another processor and/or memory (not shown) for other functions ofthe transmitting device 6.

The encoding process is not necessarily started immediately after thefirst picture is entered to the encoder, but after a certain amount ofpictures are available in the encoding buffer 1.1. Then the encoder 1tries to find suitable candidates from the pictures to be used as thereference frames. The encoder 1 then performs the encoding to formencoded pictures. The encoded pictures can, for example, be predictedpictures (P), bi-predictive pictures (B), or intra-coded pictures (1).The intra-coded pictures can be decoded without using any otherpictures, but other type of pictures need at least one reference picturebefore they can be decoded. Pictures of any of the above mentionedpicture types can be used as a reference picture. Intra-coded picturescan be used as the IDR pictures which start the independently decodablegroup of pictures. The encoder 1 may perform motion estimation and/orsome other tasks to compress the video stream. In motion estimationsimilarities between the picture to be encoded (the current picture) anda previous and/or latter picture are searched. If similarities are foundthe compared picture or part of it can be used as a reference picturefor the picture to be encoded. In JVT the display order and the decodingorder of the pictures are not necessarily the same, wherein thereference picture has to be stored in a buffer (e.g. in the encodingbuffer 1.1) as long as it is used as a reference picture. The encoder 1also inserts information on display order of the pictures into thetransmission stream.

From the encoding process the encoded pictures are moved to an codedpicture buffer 1.5, if necessary. The encoded pictures are transmittedfrom the encoder 1 to the decoder 2 via the transmission channel 4. Inthe decoder 2 the encoded pictures are decoded to form uncompressedpictures corresponding as much as possible to the encoded pictures. Eachdecoded picture is buffered in the decoded picture buffer 2.1 of thedecoder 2 unless it is displayed substantially immediately after thedecoding and is not used as a reference picture. Both the referencepicture buffering and the display picture buffering may be combinedwherein they use the same decoded picture buffer 2.1. This eliminatesthe need for storing the same pictures in two different places thusreducing the memory requirements of the decoder 2.

The decoder 2 also includes a memory 2.3 and a processor 2.2 in whichthe decoding tasks according to the invention can be applied. The memory2.3 and the processor 2.2 can be common with the receiving device 8 orthe receiving device 8 can have another processor and/or memory (notshown) for other functions of the receiving device 8. Also the buffer(s)of the decoder 2 can be implemented in the memory 2.3.

The encoder 1 defines the size of the decoded picture buffer 5.2 (DPBsize) of the hypothetical reference decoder 5. The initial size maydepend on some parameters relating to the video stream (e.g. resolutionscolour/BW, etc.). There can also be a maximum size defined for thedecoded picture buffer 5.2 (DPBcapacity). The initial size may notnecessarily be the same as the maximum size but it can also be smallerthan the maximum size. Also the maximum number of reference framesstored in the decoded picture buffer 5.2 of the encoder 1 and,respectively, the decoded picture buffer 2.1 of the decoder 2 isdefined.

In the decoder 2 the decoded picture buffer 2.1 has a limited size (DRBsize) which in some applications may be varied during the decodingprocess, if necessary. The initial size of the decoded picture buffer2.1 may depend on some parameters relating to the video stream (e.g.resolution, colour/BW, etc.). There can also be a maximum size definedfor the decoded picture buffer 2.1 (DPBcapacity). The initial size maynot necessarily be the same as the maximum size but it can also besmaller than the maximum size. Also the maximum number of referenceframes stored in the decoded picture buffer 2.1 is defined.

The transmission and/or storing of the encoded pictures (and the virtualdecoding by the hypothetical reference decoder 5) can be startedimmediately after the first encoded picture is ready. This picture isnot necessarily the first one in decoder output order because thedecoding order and the output order may not be the same. However,because the size of the decoded picture buffer 2.1 of the decoder 2 islimited it may be necessary to define how long the delay betweendecoding time of a picture and the display time of the picture can be atmaximum, i.e. the maximum number of the pictures to be reordered fordisplaying. DPB size illustrates how many pictures can be stored in thedecoded picture buffer 2.1. It can be calculated by dividing the size ofthe decoded picture buffer (in bytes) by the size of a picture (inbytes).

When the first picture of the video stream is encoded the transmissioncan be started. The encoded pictures are stored to the coded picturebuffer 1.5. The transmission can also start at a later stage, forexample, after a certain part of the video stream is encoded. This delayis indicated by the initial_cpb_removal_delay parameter mentioned aboveand it is signalled to the decoder 2. Also the hypothetical referencedecoder 5 is aware of this parameter.

The decoder 2 should output the decoded pictures in correct order. Alsothe hypothetical reference decoder 5 should virtually output the decodedpictures in correct order. The operation of the hypothetical referencedecoder model was disclosed above in this description. The relativeoutput time was mentioned in the model. The present invention disclosestwo principles for evaluation of the value of the relative output time.

According to one embodiment of the invention, the semantics of thesyntax element for temporal reference (picture_distance in AVS-M) ischanged such that the value of the syntax element continually increasesat IDR pictures as if they are non-IDR pictures as is depicted in FIGS.2 a and 2 b. In the FIGS. 1 a and 1 b a prior art video sequence isdepicted. In the FIGS. 1 a, 1 b, 2 a and 2 b the upper lines illustratethe picture types and the display order and the lower numbers illustratethe temporal references of the pictures. In these examples there are twogroups of pictures GOP1, GOP2 each having one IDR picture IDR0, IDR 1 asthe first picture and a number of successive pictures. The letterindicates the type of the picture and the number indicates theoutput/display order of the picture.

The time duration of the temporal reference difference of 1 is alsosignaled in the bitstream (for example in the sequence parameter set),and the relative output time (ROT) is derived for each picture asfollows:

For the first picture the relative output time parameter gets a value 0:

ROT(0)=0.

For any other picture, the parameter is calculated according to thefollowing equation:

ROT(n)=ROT(n−1)+(TR(n)−TR(n−1)+(MaxTR+1))/(MaxTR+1)×Delta

in which ROT(n) is the ROT value of the n-th picture, TR(n) is thetemporal reference value of the n-th picture, MaxTR is the maximum valueof temporal reference, Delta is the time duration of the temporalreference difference of 1, and/denotes modulo division. In the AVS-Mvideo coding standard, TR(n) is the picture_distance value of the n-thpicture.

According to another embodiment of the invention, the temporal gapbetween the IDR picture and the previous picture in output/display order(denoted as picture_distance_gap to be used in AVS-M) is signaled in thebitstream for each IDR picture (for example in the picture header) as isillustrated in FIG. 3 b. In FIG. 5 a the video sequence and theoutput/display order of the pictures of the video sequence are depicted.

The time duration of the temporal reference difference of 1 is alsosignaled in the bitstream (for example in the sequence parameter set),and the relative output time (ROT) mentioned above is derived for eachpicture as follows:

For the first picture, the relative output time parameter gets a value0:

ROT(0)=0.

For any other non-IDR picture, the parameter is calculated according tothe following equation:

ROT(n)=ROT(n−1)+(TR(n)+TR(n−1)+(MaxTR+1))/(MaxTR+1)×Delta

in which ROT(n) is the ROT value of the n-th picture, TR(n) is thetemporal reference value of the n-th picture, MaxTR is the maximum valueof temporal reference, Delta is the time duration of the temporalreference difference of 1, and/denotes modulo division. In the AVS-Mvideo coding standard, TR(n) is the picture_distance value of the n-thpicture.

For any other IDR picture, the parameter is calculated according to thefollowing equation:

ROT(n)=ROT(n−1)+TRgap×Delta

in which ROT(n) is the ROT value of the IDR picture. ROT(n−1) is the ROTvalue of the previous picture in output/display order, TRgap is thetemporal gap between the IDR picture and the previous picture inoutput/display order (denoted as picture_distance_gap to be used inAVS-M).

As was mentioned above, a number of one or more than one set of HRDparameters can be signaled for each coded video sequence. Each set ofHRD parameters characterizes an HRD operation point.

The invention enables a simple HRD with multiple HRD operation pointsand decoded picture buffer operations for video coding standards.

If the first embodiment of the invention is implemented and if videoediting operation such as insertion or removal of coded video sequencesto/from a bitstream is done, the temporal reference (picture_distance inAVS-M) needs to be updated for each picture in some coded videosequences.

If the second embodiment of the invention is implemented and if videoediting operation such as insertion or removal of coded video sequencesto/from a bitstream is done, the temporal reference (picture_distance inAVS-M) does not need to be updated for any picture. Instead, only thetemporal gap (denoted as picture_distance gap to be used in AVS-M) valueof the one or two IDR pictures whose preceding picture in output/displayorder has been changed need to be updated.

Next, the operation of the decoder 2 according to an embodiment of thepresent invention will be described. The decoded picture buffer 2.1contains memory places for storing a number of pictures. Those placesare also called as frame stores in this description.

The decoder 2 starts to decode the encoded pictures beginning from thepicture that first enters the coded picture buffer. When the picture isdecoded it will be stored to the additional frame store or the decodedpicture buffer. The picture to be decoded can either be a frame or afield. The output/display of the decoded pictures is performed on thebasis of the relative output time parameter ROT.

The HRD 5 is used with the encoder 1 to virtually perform the decodingof the encoded pictures similarly than the decoder 2 does. The encodedpicture buffer 1.5 can be used as a pre-decoding buffer for a HRD 5. Oneaim of the virtual decoding in the HRD 5 is to eliminate a risk fordecoding errors due to unbalanced encoding/decoding tasks. Also in theHRD 5 both the reference picture buffering and the display picturebuffering can be combined and they can use the same decoded picturebuffer 5.2 thus reducing the memory requirements of the encoder 1. Alldecoded pictures stay in the unified decoded picture buffer until theyare no longer used as reference pictures and until their (virtual)display time or relative output time is reached. The term virtual refersto the fact that in the HRD 5 of the encoder 1, in which the decoding isperformed, the decoded pictures are not outputted/displayed but the HRD5 only checks if there could be errors in the decoding process of thedecoder 2 due to, for example, too small buffer size. If errors existthe HRD 5 can inform the encoder to change some encoding parameters, orthe size of the decoded picture buffer 2.1 of the decoder 1 can beincreased, for example: by sending a SEI (Supplemental EnhancementInformation) message to the decoder 1 in some implementations (unlessthe maximum size of the decoded picture buffer 5.2, 2.1 is already inuse).

The decoding can be simultaneous operation with encoding, or the encoderfirst creates the bitstream, and when the bitstream is ready, it will beinput to HRD 5 for checking that the bitstream fulfils the HRD 5 andprocessing level requirements. The HRD may also create and modify someHRD parameters, such as the initial buffering delay in coded picturebuffer, according to the characteristics of the coded stream.

The hypothetical reference decoder 5 can further comprise an output forproviding the HRD parameters for decoding the bitstream. The parameterscan be provided e.g. with the bitstream comprising the encoded picturesor as a separate information, for example as a signaling bit stream, afile format container etc.

The hypothetical reference decoder 5 can also be used as a bitstreamanalyzer to analyze whether the encoded bitstream is compliant to astandard in which format the bitstream is. Therefore, if thehypothetical reference decoder 5 detects that the bitstream is notcompliant with the standard according to which the bitstream is encoded,the hypothetical reference decoder 5 may indicate it to an encoder orother device where the signal is coming from.

The present invention can also be implemented as a part of a transcoder(not shown) which selects one or more encoding parameters and transcodesa bitstream using the selected parameters. Transcoding may be done bydecoding first and then encoding, for example.

The present invention can be applied in many kind of systems anddevices. The transmitting device 6 including the encoder 1 and the HRD 5advantageously include also a transmitter 7 to transmit the encodedpictures to the transmission channel 4. The receiving device 8 includethe decoder 2, a receiver 9 to receive the encoded pictures, and adisplay 10 on which the decoded pictures can be displayed. Thetransmission channel can be for example, a landline communicationchannel and/or a wireless communication channel. The transmitting deviceand the receiving device include also one or more processors 1.2, 2.2which can perform the necessary steps for controlling theencoding/decoding process of video stream according to the invention.Therefore, the method according to the present invention can mainly beimplemented as machine executable steps of the processors. The bufferingof the pictures can be implemented in the memory 1.3, 2.3 of thedevices. The program code 1.4 of the encoder can be stored into thememory 1.3. Respectively, the program code 2.4 of the decoder can bestored into the memory 2.3.

It is also possible that the encoded picture stream is not transmittedto the receiving device but it can be stored to a storage medium fromwhere it can be retrieved for transmission and/or decoding.

1. An encoder comprising an input for inputting video signal to beencoded to form an encoded video signal comprising pictures of a firstcoded video sequence and a second coded video sequence; an encodedpicture buffer; a decoded picture buffer; and a definer for defining atleast one parameter indicative of the temporal difference between thelast picture of said first coded video sequence and the first picture ofsaid second coded video sequence, wherein said at least one parameter issignaled in the encoded video signal.
 2. The encoder according to claim1, wherein said temporal difference is one of the following: temporalreference; picture distance; absolute time difference.
 3. The encoderaccording to claim 2, wherein said at least one parameter comprises aparameter indicative of the time duration of a temporal referencedifference of one.
 4. The encoder according to claim 2, wherein said atleast one parameter comprises a parameter indicative of the temporalreference gap between the last picture of the first coded video sequenceand the first picture of the second coded video sequence inoutput/display order.
 5. The encoder according to claim 1, furthercomprising a hypothetical decoder for hypothetically decoding encodedvideo signal.
 6. The encoder according to claim 5, said hypotheticaldecoder being adapted to inform the encoder to change at least oneencoding parameter.
 7. The encoder according to claim 5, saidhypothetical decoder being adapted to inform to change the size of adecoded picture buffer of a decoder.
 8. A bitstream comprising anencoded video signal comprising pictures of a first coded video sequenceand a second coded video sequence; and at least one parameter indicativeof the temporal difference between the last picture of said first codedvideo sequence and the first picture of said second coded video sequencesaid at least one parameter.
 9. The bitstream according to claim 8,wherein said temporal difference is one of the following: temporalreference; picture distance; absolute time difference.
 10. The bitstreamaccording to claim 9, wherein said at least one parameter comprises aparameter indicative of the time duration of a temporal referencedifference of one.
 11. The bitstream according to claim 9, wherein saidat least one parameter comprises a parameter indicative of the temporalreference gap between the last picture of the first coded video sequenceand the first picture of the second coded video sequence inoutput/display order.
 12. The bitstream according to claim 9, comprisinginformation for a decoder to change the size of a decoded picture bufferof the decoder.
 13. A decoder comprising an input for inputting encodedvideo signal to be decoded, said encoded video signal comprisingpictures of a first coded video sequence and a second coded videosequence; and at least one parameter indicative of the temporaldifference between the last picture of said first coded video sequenceand the first picture of said second coded video sequence, said at leastone parameter; a decoded picture buffer; and means for parsinginformation received in the encoded video signal to obtain said at leastone parameter.
 14. The decoder according to claim 13, wherein saidtemporal difference is one of the following: temporal reference; picturedistance; absolute time difference.
 15. The decoder according to claim14, wherein said at least one parameter comprises a parameter indicativeof the time duration of a temporal reference difference of one.
 16. Thedecoder according to claim 14, wherein said at least one parametercomprises a parameter indicative of the temporal reference gap betweenthe last picture of the first coded video sequence and the first pictureof the second coded video sequence in output/display order.
 17. Thedecoder according to claim 13, wherein the decoder is adapted to usesaid at least one parameter in at least one of the following: decodingthe encoded video stream; outputting decoded video pictures; ordisplaying decoded video pictures.
 18. A method comprising inputtingvideo signal to be encoded to form an encoded video signal comprisingpictures of a first coded video sequence and a second coded videosequence; defining at least one parameter indicative of the temporaldifference between the last picture of said first coded video sequenceand the first picture of said second coded video sequence, wherein saidat least one parameter is signaled in the encoded video signal.
 19. Themethod according to claim 18 comprising defining said temporaldifference as one of the following: temporal reference; picturedistance; absolute time difference.
 20. The method according to claim19, wherein said at least one parameter comprises a parameter indicativeof the time duration of a temporal reference difference of one.
 21. Themethod according to claim 19, wherein said at least one parametercomprises a parameter indicative of the temporal reference gap betweenthe last picture of the first coded video sequence and the first pictureof the second coded video sequence in output/display order.
 22. Themethod according to claim 18, further comprising hypothetically decodingencoded video signal.
 23. The method according to claim 22, wherein saidhypothetically decoding comprises informing the encoder to change atleast one encoding parameter.
 24. The method according to claim 22,wherein said hypothetically decoding comprises informing the decoder tochange the size of a decoded picture buffer of the decoder.
 25. A systemcomprising an encoder comprising an input for inputting video signal tobe encoded to form an encoded video signal comprising pictures of afirst coded video sequence and a second coded video sequence; an encodedpicture buffer; a decoded picture buffer; and a definer for defining atleast one parameter indicative of the temporal difference between thelast picture of said first coded video sequence and the first picture ofsaid second coded video sequence, wherein said at least one parameter issignaled in the encoded video signal; a decoder comprising an input forinputting said encoded video signal to be decoded; a decoded picturebuffer; and means for parsing information received in the encoded videosignal to obtain said at least one parameter.
 26. The system accordingto claim 25, wherein said temporal difference is one of the following:temporal reference; picture distance; absolute time difference.
 27. Thesystem according to claim 26, wherein said at least one parametercomprises a parameter indicative of the time duration of a temporalreference difference of one.
 28. The system according to claim 26,wherein said at least one parameter comprises a parameter indicative ofthe temporal reference gap between the last picture of the first codedvideo sequence and the first picture of the second coded video sequencein output/display order.
 29. The system according to claim 25, saidencoder further comprising a hypothetical decoder for hypotheticallydecoding encoded video signal.
 30. The system according to claim 29,said hypothetical decoder being adapted to inform the encoder to changeat least one encoding parameter.
 31. The system according to claim 29,said hypothetical decoder being adapted to inform to change the size ofa decoded picture buffer of a decoder.
 32. A computer program productcomprising machine executable instructions for inputting video signal tobe encoded to form an encoded video signal comprising pictures of afirst coded video sequence and a second coded video sequence; definingat least one parameter indicative of the temporal difference between thelast picture of said first coded video sequence and the first picture ofsaid second coded video sequence signaling said at least one parameterin the encoded video stream.
 33. The computer program product accordingto claim 32 comprising machine executable instructions for defining saidtemporal difference as one of the following: temporal reference; picturedistance; absolute time difference.
 34. The computer program productaccording to claim 33, wherein said at least one parameter comprises aparameter indicative of the time duration of a temporal referencedifference of one.
 35. The computer program product according to claim33, wherein said at least one parameter comprises a parameter indicativeof the temporal reference gap between the last picture of the firstcoded video sequence and the first picture of the second coded videosequence in output/display order.
 36. A medium for carrying a bitstreamcomprising an encoded video signal comprising pictures of a first codedvideo sequence and a second coded video sequence; and at least oneparameter indicative of the temporal difference between the last pictureof said first coded video sequence and the first picture of said secondcoded video sequence; said at least one parameter.